[vllm] [cpu] [sagemaker] Add vLLM CPU inference image for SageMaker#5670
Open
timelfrink wants to merge 2 commits intoaws:masterfrom
Open
[vllm] [cpu] [sagemaker] Add vLLM CPU inference image for SageMaker#5670timelfrink wants to merge 2 commits intoaws:masterfrom
timelfrink wants to merge 2 commits intoaws:masterfrom
Conversation
Add support for vLLM CPU inference on SageMaker, aligned with official vLLM CPU Dockerfile patterns. Features: - Multi-stage build: base → vllm-build → vllm-cpu → sagemaker - Uses uv package manager for fast dependency installation - Python 3.12 via uv (not limited to system python) - Build caching with --mount=type=cache for apt, uv, ccache - Wheel-based install (build wheel, then install separately) - Uses official vLLM requirements files (cpu.txt, cpu-build.txt) - Intel OpenMP + tcmalloc for x86_64 CPU performance - gcc-12 as explicit compiler version New files: - vllm/x86_64/cpu/Dockerfile.cpu: Multi-stage Dockerfile - vllm/buildspec-cpu-sm.yml: Build configuration for SageMaker Expected image tag: vllm:0.15.1-cpu-py312-ubuntu22.04-sagemaker Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Set image_size_baseline to 5000 (actual image ~3.5GB) - Add ulimit -c 0 to disable core dumps (matches upstream)
7523dee to
eb25cb6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub Issue #, if available: N/A
Description
Add vLLM CPU-only inference image for SageMaker. Enables running vLLM on CPU instances for reranking, scoring, embeddings, and small generative models.
vllm/x86_64/cpu/Dockerfile.cpu— Multi-stage build fromubuntu:22.04, compiles vLLM v0.15.1 withVLLM_TARGET_DEVICE=cpu. Uses tcmalloc + Intel OpenMP, Python 3.12 via uv, reuses sharedsagemaker_entrypoint.sh.vllm/buildspec-cpu-sm.yml— Buildspec for CPU SageMaker target. Tag:0.15.1-cpu-py312-ubuntu22.04-sagemaker.Manual testing on EC2 (c5.4xlarge):
/health,/pingreturn 200/v1/completionsworks (facebook/opt-125m)/scoreand/invocationswork with reranker (Alibaba-NLP/gte-multilingual-reranker-base)Tests Run
Formatting
PR Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.